import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/index',
    children:[
      {
        path: '/index',
        component: () => import('../views/IndexView.vue')
      },{
        path: '/call-number',
        component: () => import('../views/CallNumberView.vue')
      }, {
        path: '/call-number/retain-number',
        component: () => import('../views/RetainNumberView.vue')
      }, {
        path: '/take-orders',
        component: () => import('../views/TakeOrdersView.vue')
      }, {
        path: '/check-orders',
        component: () => import('../views/CheckOrdersView.vue')
      },{
        path: '/completed-orders',
        component: () => import('../views/CompletedOrdersView.vue')
      }, {
        path: '/cash-register',
        component: () => import('../views/CashRegisterView.vue')
      }
    ]
  },{
    path: '/login',
    component: () => import('../views/LoginView.vue')
  }
]


const router = new VueRouter({
  routes
})

export default router
